package com.liushuai.eas.service;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.liushuai.eas.mapper.StudentMapper;
import com.liushuai.eas.pojo.Student;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.io.Serializable;
import java.util.Collection;
import java.util.List;
import java.util.Map;

@Service
public class StudentImp implements StudentMapper {

    @Resource
    private StudentMapper studentMapper;

    @Override
    public int insert(Student entity) {return studentMapper.insert(entity);}

    @Override
    public int deleteById(Serializable id) {
        return studentMapper.deleteById(id);
    }

    @Override
    public int deleteById(Student entity) {return studentMapper.deleteById(entity);}

    @Override
    public int deleteByMap(Map<String, Object> columnMap) {
        return 0;
    }

    @Override
    public int delete(Wrapper<Student> queryWrapper) {
        return 0;
    }

    @Override
    public int deleteBatchIds(Collection<?> idList) {
        return 0;
    }

    @Override
    public int updateById(Student entity) {return studentMapper.updateById(entity);}

    @Override
    public Student selectOne(Wrapper<Student> queryWrapper) {return studentMapper.selectOne(queryWrapper);}

    @Override
    public int update(Student entity, Wrapper<Student> updateWrapper) {
        return 0;
    }

    @Override
    public Student selectById(Serializable id) { return studentMapper.selectById(id); }

    @Override
    public List<Student> selectBatchIds(Collection<? extends Serializable> idList) {
        return null;
    }

    @Override
    public List<Student> selectByMap(Map<String, Object> columnMap) {
        return null;
    }

    @Override
    public Long selectCount(Wrapper<Student> queryWrapper) {
        return null;
    }

    @Override
    public List<Student> selectList(Wrapper<Student> queryWrapper) {
        return studentMapper.selectList(queryWrapper);
    }

    @Override
    public List<Map<String, Object>> selectMaps(Wrapper<Student> queryWrapper) {
        return null;
    }

    @Override
    public List<Object> selectObjs(Wrapper<Student> queryWrapper) {
        return null;
    }

    @Override
    public <P extends IPage<Student>> P selectPage(P page, Wrapper<Student> queryWrapper) {
        return studentMapper.selectPage(page,queryWrapper);
    }

    @Override
    public <P extends IPage<Map<String, Object>>> P selectMapsPage(P page, Wrapper<Student> queryWrapper) {
        return null;
    }

    @Override
    public List<Student> queryStudentList(int pageBegin, int pageEnd) {
        return studentMapper.queryStudentList(pageBegin,pageEnd);
    }

    @Override
    public List<Student> queryStudentListBySearch(int pageBegin, int pageEnd, String search) {
        return studentMapper.queryStudentListBySearch(pageBegin,pageEnd,search);
    }

    @Override
    public int queryTotal() {
        return studentMapper.queryTotal();
    }

    @Override
    public int queryTotalBySearch(String search) {
        return studentMapper.queryTotalBySearch(search);
    }

    @Override
    public int queryBoysNum() {
        return studentMapper.queryBoysNum();
    }

    @Override
    public int queryGirlNum() {
        return studentMapper.queryGirlNum();
    }

    @Override
    public List<Map<Object, Object>> queryMajorStudentNum() {
        return studentMapper.queryMajorStudentNum();
    }

    @Override
    public Student queryStudentById(int id) {
        return studentMapper.queryStudentById(id);
    }

    @Override
    public List<Map<String,Object>> queryStudentListByClass(int classId) {
        return studentMapper.queryStudentListByClass(classId);
    }
}
